<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<center>
<table width="1200px" border=1 cellpadding="0" cellspacing="0">
	<tr>
		<td valign="top" width="200px">
		<!-- START RIGHT MENU PAGE -->
		<%@include file="rightMenu.jsp" %>
		<!-- END RIGHT MENU PAGE -->
		</td>
		<td>
		<!-- START CONTENT PAGE -->
			<form action="/EfrAdm/SearchEmail.do" method="post">
				<table>
					<tr>
						<td>Email: </td>
						<td><input type="text"  name="email"></td>
						<td><input type="submit" value="Search" name="action"></td>
					</tr>
				</table>
			</form>
			<c:if test="${fn:length(emails) gt 0}">
			<form action="/EfrAdm/SearchEmail.do" method="post">
				<table border="1">
					<tr>
						<th>id</th>
						<th>nume</th>
						<th>prenume</th>
						<th>email</th>
						<th>obs</th>
						<th>confirmare</th>
						<th>code</th>
						<th>ipUnsubscribe</th>
						<th>dataUnsubscribe</th>
						<th>dataSubsubscribe</th>
						<th>dataConfirmation</th>
						<th></th>
					</tr>
					<c:forEach var="email" items="${emails }">
						<tr>
							<td>${email.id}.</td>
							<td>${email.nume}</td>
							<td>${email.prenume}</td>
							<td>${email.email}</td>
							<td>${email.obs}</td>
							<td>${email.confirmare}</td>
							<td>${email.code}</td>
							<td>${email.ipUnsubscribe}</td>
							<td>${email.dataUnsubscribe}</td>
							<td>${email.dataSubsubscribe}</td>
							<td>${email.dataConfirmation}</td>
							<td><input type="radio" name="id" value="${email.id }"></td>
						</tr>
						</c:forEach>
					<tr>
						<td colspan="12" align="center"><input type="submit" name="action" value="Details"></td>
					</tr>
				</table>
			</form>
			</c:if>
		<!-- END CONTENT PAGE -->
		</td>
	</tr>
</table>
</center>
</body>
</html>